<template>
	<view class="goods-swiper" v-if="detail">
		<swiper class="swiper" circular indicator-dots autoplay :interval="interval" :duration="duration"
			style="width: 100%;height: 100%;">
			<swiper-item>
				<image
					:src="detail.product_images"
					class="goods-swiper-image" mode="aspectFit" />
			</swiper-item>
		</swiper>
	</view>
</template>

<script setup lang="ts">
	import { defineProps } from 'vue';
	const interval : number = 5000;
	const duration : number = 500;

	interface IProps {
		detail : IGoods | null
	}

	const props = withDefaults(defineProps<IProps>(), {
		detail: null
	})
</script>

<style lang="scss" scoped>
	@import "./goodsSwiper.scss";
</style>